package net.yxsoft.kit;

//import cn.unitid.realidentity.sdk.ApiClient;
//import cn.unitid.realidentity.sdk.ApiException;
//import cn.unitid.realidentity.sdk.DefaultApiClient;
//import cn.unitid.realidentity.sdk.request.VerifyTokenGetRequset;
//import cn.unitid.realidentity.sdk.response.VerifyTokenGetResponse;
import com.alibaba.fastjson.JSONObject;
import com.google.gson.JsonPrimitive;
import wxgz.ijiami.api.WxgzAddressApi;

import java.util.Map;

public class H5Kit {
    public static void main(String[] args){
        //提供的url
        String url = "http://api.spiderid.cn/api/router/rest";
        //您的appKey
        String appkey = "JhdAEoLBBAzT1oj9";
        //您的appSecret
        String secretKey = "sCMkyaSOOXqztKW3UkUwtZniEcd8ZTqI";


       Map map= WxgzAddressApi.getPosition(87.701036, 43.890354, null, null,null);
       Map<String, JsonPrimitive> mpas= (Map<String, JsonPrimitive>) map.get("data");
      System.out.println(mpas.get("areaname").toString().replaceAll("\"",""));
//
//        1.默认客户端
//        ApiClient apiClient = new DefaultApiClient(url, appkey, secretKey);
//        //2.调用出错自动重试客户端
//        //AutoRetryApiClient apiClient = new AutoRetryApiClient(url, appkey, secretKey);
//        VerifyTokenGetRequset req = new VerifyTokenGetRequset();
//        //随机数，唯一
//        String sjc=ChineseDateUtil.getNextNaos().toString();
//        req.setTicketId(sjc);
//        //业务场景
//        req.setBizScene(VerifyTokenGetRequset.BizScene.LIVENESS_H5);
//
//        //扩展参数
//        JSONObject json = new JSONObject();
//        //认证成功回调地址
//        json.put("callback","http://www.baidu.com");
//        req.setAttr(json.toJSONString());
//        try {
//            VerifyTokenGetResponse response = apiClient.execute(req);
//            System.out.println(response.getMsg());
//            //后续业务处理
//        } catch (ApiException e) {
//            e.printStackTrace();
//        }
        //System.out.println(json);
    }


}
